package ch02.sec03;

public class EmployeeDemo {
    public static void main(String[] args) {
        System.out.println("==============================");
        Employee james = new Employee("James Bond", 500000);
        System.out.println(james.getName());
        System.out.println(james.getSalary());
        // calls Employee(String, double) constructor
        var anonymous = new Employee("", 40000);
        // calls Employee(double) constructor
        var unpaid = new Employee("Igor Intern");
        System.out.printf("{ Id: %d, Name: %s }%n", unpaid.getId(), unpaid.getName());
        var employee = new Employee("Jack Welch");
        System.out.printf("{ Id: %d, Name: %s }%n", employee.getId(), employee.getName());
        // no-arg constructor
        System.out.println("==============================");
    }
}
